package com.link.base.base.approval.dao.mybatis.mapper;

import com.link.base.base.approval.model.FlowRecord;
import com.link.core.basic.dao.mapper.BasicMapper;

import java.util.List;
/**
 * Copyright  hande Company. All Rights Reserved.
 *
 * @author  unknwon
 * @date:   2018/11/8 15:47
 * @version 1.0
 */

public interface FlowRecordMapper extends BasicMapper<FlowRecord> {

    /**
     * 查询业务对象审批历史
     *
     * @param record
     * @return
     * @throws Exception
     *
     */
    public List<FlowRecord> queryObjFlowRecordListPage(FlowRecord record) throws  Exception;

    /**
     * 根据审批Id，审批节点Id，查询的当前审批的上一审批节点最后审批时间
     *
     * @param record
     * @return
     * @throws Exception
     */
    public String queryLastNodeMaxTime(FlowRecord record) throws Exception;

    /**查询当前记录
     * @param record
     * @return
     * @throws Exception
     */
    public List<FlowRecord> queryCurrRecordSelect(FlowRecord record) throws Exception;

    /**
     * 根据审批流程id获取最新审批到哪条记录
     *
     * @author 姚江漪
     * @date 2019/07/01 10:07
     */
    public FlowRecord queryLastNodeMaxSn(FlowRecord record) throws Exception;
}
